<template>
  <div class="app-container">
    <el-form class="basic-form detail-form" ref="form" :model="form" label-width="120px" label-suffix=":">
      <el-row>
        <el-col :span="8">
          <el-form-item label="职位" prop="position">
            {{ form.position }}
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="薪资" prop="salary">
            {{ form.salary }}
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="经验要求" prop="experienceRequire">
            {{ form.experienceRequire }}
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="学历要求" prop="educationRequire">
            {{ form.educationRequire }}
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="工作地点" prop="workSite">
            {{ form.workSite }}
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="职位性质" prop="positionNature">
            {{ form.positionNature }}
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item label="序号" prop="sortNumber">
            {{ form.sortNumber }}
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="是否启用" prop="isEnable">
            {{ config.isEnableMap[form.isEnable] }}
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="是否删除" prop="isDelete">
            {{ config.isEnableMap[form.isDelete] }}
          </el-form-item>
        </el-col>
      </el-row>

      <el-form-item label="岗位要求" prop="positionRequire">
        <div v-html="form.positionRequire"></div>
      </el-form-item>
      <el-form-item label="岗位职责" prop="positionDuties">
        <div v-html="form.positionDuties"></div>
      </el-form-item>
      <el-form-item label="在线申请" prop="onlineApply">
        <div v-html="form.onlineApply"></div>
      </el-form-item>


      <el-form-item class="noborder">
        <el-button v-waves @click="handleReset()">返回</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
import Tinymce from '@/components/Tinymce';
import SingleImageUpload from '@/components/Upload/SingleImage';
import waves from '@/directive/waves';
import * as recruitmentHttp from '@/api/recruitment';
import * as config from '@/utils/config';

export default {
  name: 'careers-detail',
  components: { Tinymce, SingleImageUpload, Tinymce },
  directives: { waves },
  data() {
    return {
      form: {},

      // 下拉框等配置
      config
    }
  },
  mounted() {
    this.form = Object.assign({}, this.$store.state.recruitment.recruitmentMap);
  },
  methods: {
    handleReset() {
      this.$router.go(-1);
    },
  }
}
</script>
<style lang="scss" scoped>
.detail-form ::v-deep .el-form-item__content {
  border: 1px solid #C0C4CC;
  padding-left: 10px;
  padding-right: 10px;
}
.noborder ::v-deep .el-form-item__content {
  border: none;
  padding-left: 0;
  padding-right: 0;
}
</style>